package com.ujs.dao;

import com.ujs.pojo.Role;
import com.ujs.pojo.UserInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @title: UserInfoDao
 * @Author liyunxiao
 * @Date: 2021/1/11 16:12
 */
public interface UserInfoDao extends JpaRepository<UserInfo,String>, JpaSpecificationExecutor<String> {
    UserInfo findByUserName(String userName);
//
//    @Query(value = "select * from tb_role where role_id not in ( select fk_role_id from user_role where fk_user_id=?)",nativeQuery = true)
//    List<Role>findOtherRoles(String userId);
}
